import request from '@/utils/request'

// 查询团课预约管理列表
export function listReservation(query) {
  return request({
    url: '/keep/reservation/list',
    method: 'get',
    params: query
  })
}

// 查询团课预约管理详细
export function getReservation(id) {
  return request({
    url: '/keep/reservation/' + id,
    method: 'get'
  })
}

// 新增团课预约管理
export function addReservation(data) {
  return request({
    url: '/keep/reservation',
    method: 'post',
    data: data
  })
}

// 修改团课预约管理
export function updateReservation(data) {
  return request({
    url: '/keep/reservation',
    method: 'put',
    data: data
  })
}

// 删除团课预约管理
export function delReservation(id) {
  return request({
    url: '/keep/reservation/' + id,
    method: 'delete'
  })
}

// 团课预约查询--全部
export function teamReservationList(query) {
  return request({
    url: '/keep/reservation/teamReservationList',
    method: 'get',
    params: query
  })
}

// 同意退款
export function updateReservationOrderStatus(id) {
  return request({
    url: '/keep/reservation/updateReservationOrderStatus/' + id,
    method: 'post'
  })
}

// 不同意退款
export function updateReservationOrderStatusRefuse(id) {
  return request({
    url: '/keep/reservation/updateReservationOrderStatusRefuse/' + id,
    method: 'post'
  })
}

// 私课预约查询--全部
export function personalReservationList(query) {
  return request({
    url: '/keep/reservation/personalReservationList',
    method: 'get',
    params: query
  })
}


// 商品订单查询--全部
export function getgoodsOrderList(query) {
  return request({
    url: '/keep/order/goodsOrder/condition',
    method: 'get',
    params: query
  })
}
